import 'package:xin_nuo_pda/bean/ware_house_entity.dart';

wareHouseEntityFromJson(WareHouseEntity data, Map<String, dynamic> json) {
	if (json['WAREHOUSES'] != null) {
		data.wAREHOUSES = (json['WAREHOUSES'] as List).map((v) => WareHouseWAREHOUSES().fromJson(v)).toList();
	}
	return data;
}

Map<String, dynamic> wareHouseEntityToJson(WareHouseEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['WAREHOUSES'] =  entity.wAREHOUSES?.map((v) => v.toJson())?.toList();
	return data;
}

wareHouseWAREHOUSESFromJson(WareHouseWAREHOUSES data, Map<String, dynamic> json) {
	if (json['WAREHOUSEID'] != null) {
		data.wAREHOUSEID = json['WAREHOUSEID'].toString();
	}
	if (json['DESCRIPTION'] != null) {
		data.dESCRIPTION = json['DESCRIPTION'].toString();
	}
	if (json['STORAGES'] != null) {
		data.sTORAGES = (json['STORAGES'] as List).map((v) => WareHouseWAREHOUSESSTORAGES().fromJson(v)).toList();
	}
	return data;
}

Map<String, dynamic> wareHouseWAREHOUSESToJson(WareHouseWAREHOUSES entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['WAREHOUSEID'] = entity.wAREHOUSEID;
	data['DESCRIPTION'] = entity.dESCRIPTION;
	data['STORAGES'] =  entity.sTORAGES?.map((v) => v.toJson())?.toList();
	return data;
}

wareHouseWAREHOUSESSTORAGESFromJson(WareHouseWAREHOUSESSTORAGES data, Map<String, dynamic> json) {
	if (json['NAME'] != null) {
		data.nAME = json['NAME'].toString();
	}
	if (json['DESCRIPTION'] != null) {
		data.dESCRIPTION = json['DESCRIPTION'].toString();
	}
	if (json['CATEGORY'] != null) {
		data.cATEGORY = json['CATEGORY'].toString();
	}
	return data;
}

Map<String, dynamic> wareHouseWAREHOUSESSTORAGESToJson(WareHouseWAREHOUSESSTORAGES entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['NAME'] = entity.nAME;
	data['DESCRIPTION'] = entity.dESCRIPTION;
	data['CATEGORY'] = entity.cATEGORY;
	return data;
}